﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>JooQ :: Demos :: Message and Broadcast</title>
    <style type="text/css">
        .square { height: 100px; width: 100px; }
        .bg-red { background-color: Red; }
        .bg-green { background-color: Green; }
        .toggle-off { display: none; }
        .toggle-on { display: block; }
        .block { margin: 5px; float: left; }
        .pointer { cursor: pointer; }
    </style>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script type="text/javascript" src="scripts/jquery/liveQuery.js?v=1"></script>
    <script type="text/javascript" src="scripts/core.js?v=1"></script>
    <script type="text/javascript" src="scripts/events.js?v=1"></script>
    <script type="text/javascript" src="scripts/bootloader.js?v=1"></script>
    <script type="text/javascript" src="scripts/behaviors.js?v=1"></script>
</head>
<body>
    <h1>
        JooQ :: Message and Broadcast</h1>
    <h3>
        Message
    </h3>
    <input type="button" onclick="$('#toggleOnClick').msg('toggle')" value="Toggle Single Element" />
    <div class="square mas" data-behaviors-lazy="Docs.Demos.Toggler" id="toggleOnClick">
        <div class="bg-green square pointer toggle-off">
        </div>
        <div class="bg-red square pointer toggle-on">
        </div>
    </div>
    <hr />
    <h3>
        Broadcast
    </h3>
    <input type="button" onclick="$('#toggleBroadcast').broadcast('toggle')" value="Toggle Multiple Elements" />
    <div id="toggleBroadcast">
        <div class="square block" data-behaviors-lazy="Docs.Demos.Toggler" class="block">
            <div class="bg-green square pointer toggle-off">
            </div>
            <div class="bg-red square pointer toggle-on">
            </div>
        </div>
        <div class="square block" data-behaviors-lazy="Docs.Demos.Toggler" class="block">
            <div class="bg-green square pointer toggle-off">
            </div>
            <div class="bg-red square pointer toggle-on">
            </div>
        </div>
        <div class="square block" data-behaviors-lazy="Docs.Demos.Toggler" class="block">
            <div class="bg-green square pointer toggle-off">
            </div>
            <div class="bg-red square pointer toggle-on">
            </div>
        </div>
    </div>
</body>
</html>
